package jtalk.model;

public class Message {
	
	private Contact from;
	private Contact to;
	
	private String message;
	
	public final Contact getFrom() {
		if(this.from == null) {
			return new Contact("me");
		}
		return from;
	}

	public final void setFrom(Contact from) {
		this.from = from;
	}

	public final String getMessage() {
		return message;
	}

	public final void setMessage(String message) {
		this.message = message;
	}

	public final Contact getTo() {
		return to;
	}

	public final void setTo(Contact to) {
		this.to = to;
	}
	
	public String toString() {
		return "Message : From " + this.getFrom().getName() + " To " + this.to.getName();
	}

}
